﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;

namespace Registration.Localization.Formatting
{
    [Export(typeof(NameFormatter))]
    public class ProperNameFormatter : NameFormatter
    {
        public override string FormatName(string firstName, string surname)
        {
            return FormatCase(firstName) + " " + FormatCase(surname);
        }

        private string FormatCase(string name)
        {
            return Char.ToUpper(name[0]) + name.Substring(1);
        }
    }
}
